package com.strato.mvc.api.v1_0_0.control;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.strato.base.osgi.v1_0_0.Ordered;
import com.strato.mvc.api.v1_0_0.model.ModelAndView;
import com.strato.mvc.api.v1_0_0.util.RequestMeta;

public interface HttpInvokerInterceptor extends Ordered{

	boolean canHandle(HttpServletRequest request, HttpServletResponse response, PathVariableCollector pvc, RequestMeta meta, HttpInvoker invoker);

	boolean beforeInvocation(HttpServletRequest request, HttpServletResponse response, PathVariableCollector pvc,ModelAndView mav, HttpInvoker invoker);

	void invocationSuccess(HttpServletRequest request, HttpServletResponse response, PathVariableCollector pvc, ModelAndView mav, HttpInvoker invoker);

	void invokeFinally(HttpServletRequest request, HttpServletResponse response, PathVariableCollector pvc, HttpInvoker invoker);

	void invocationFailed(HttpServletRequest request, HttpServletResponse response, PathVariableCollector pvc, Exception e, HttpInvoker invoker);
}
